package com.eas.biz.dao.user.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.eas.biz.dao.user.dataobject.SchoolDO;
import com.eas.biz.dao.user.interfaces.SchoolDao;
import com.eas.biz.framework.BaseQuery;
import com.eas.biz.framework.dao.GenericDaoImpl;

@Repository("schoolDao")
public class SchoolDaoImpl extends GenericDaoImpl<SchoolDO> implements SchoolDao {

    public SchoolDO selectById(long id) {
        return selectById("School.selectById", id);
    }

    public long insert(SchoolDO school) {
        return insert("School.add", school);
    }

    public int deleteById(long id) {
        return deleteById("School.deleteById", id);
    }

    public int update(SchoolDO school) {
        return update("School.update", school);
    }

    public List<SchoolDO> selectByQuery(BaseQuery query) {
        return selectByQuery("School.selectByQuery", query);
    }

    public int countByQuery(BaseQuery query) {
        return countByQuery("School.countByQuery", query);
    }

}
